Upgrade Clock library to 5.0 leveraging mostly Symfony#2
Merged
dbellettini merged 1 commit intomasterfrom Aug 8, 2025
Merged
Conversation
093131d to
7eb18f8
Compare
7eb18f8 to
0fe56d2
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR upgrades the Clock library to version 5.0, transitioning from the custom Recruiter Clock implementation to Symfony's Clock component. The key changes include replacing clock method calls from current() to now(), utilizing Symfony's sleep functionality, and updating DateTime handling to use immutable objects.
- Migrated from
Recruiter\ClocktoSymfony\Component\Clock\ClockInterface - Replaced
current()method calls withnow()to match Symfony Clock API - Updated sleep functionality to use clock-based sleep instead of external callback
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| composer.json | Updates recruiterphp/clock dependency from ^4.1 to ^5.0 |
| src/Recruiter/Concurrency/PeriodicalCheck.php | Migrates to Symfony ClockInterface and updates method calls |
| src/Recruiter/Concurrency/MongoLock.php | Refactors to use Symfony Clock with improved constructor and sleep handling |
| tests/Recruiter/Concurrency/PeriodicalCheckTest.php | Updates test to use MockClock and sleep method |
| tests/Recruiter/Concurrency/MongoLockTest.php | Comprehensive test updates for new clock interface and verification patterns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.